// 1. 一次性引入 src/views 下所有 **View.vue
const modules = import.meta.glob('@/views/**/**.vue')

// 2. 封装
export const routeLazy = (view: string) => {
  const path = `/src/views/${view}.vue`
  return modules[path] || (() => import('@/views/errors/NotFound.vue'))
}
